package com.mt.roll.process.params;

import com.mt.roll.core.base.BaseParam;
import com.mt.roll.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Author: liguanghao
 * @Date: 2021/3/31 15:41
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "工序参数对象", description = "用于新增和更新工序信息")
public class WorkSequenceParam extends BaseParam {

    private static final long serialVersionUID = 1L;

    /**
     * 主键，自增
     */
    @ApiModelProperty(value = "主键，更新时需要填写", example = "1")
    @NotNull(message = "工序ID不能为空", groups = {UpdateGroup.class})
    private Long id;

    /**
     * 工序名称
     */
    @ApiModelProperty(value = "工序名称", required = true, example = "工序名称")
    @NotBlank(message = "工序名称不能为空")
    private String name;

    /**
     * 工序编码
     */
    @ApiModelProperty(value = "工序编码", required = true, example = "工序编码")
    private String code;

    /**
     * 工序关联设备id
     */
    @ApiModelProperty(value = "工序关联设备id", required = true, example = "1")
    private List<Long> equipmentIds;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注",required = false, example = "0")
    private String remark;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述", required = false,example = "0")
    private String description;
    /**
     * 类型：0加工设备，1缓存区
     */
    @ApiModelProperty(value = "类型：0加工设备，1缓存区", example = "0")
    private Integer type;
}
